package com.ecelin.config;

import com.bstek.ureport.definition.datasource.BuildinDatasource;
import org.springframework.stereotype.Component;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;


@Component
public class UreportDb1 implements BuildinDatasource {
	@Override
	public String name() {
		return "本地数据源-demo";
	}

	@Override
	public Connection getConnection() {
		Connection connection = null;
		try {
			connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/demo", "root", "root");
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return connection;
	}
}
